

<script>
import Vue from 'vue'
var name = Vue.prototype.post({id:'8f81940f-85cb-41be-9c95-a8858bd39125'},'services/app/policy/GetPolicyListByTemplate').then(res=>{
   let data = res.result.excelHtml;
   return data;
})
console.log(name)
console.log('++++++++++++++++++++')
export default {

  name: "system",
  template:this.data,
  props: {
      data:String,
    model: Object,
    parentid: Number,
    actid: Number,
    addNew: {
      type: Function,
      default: null
    },
    viewInfo: {
      type: Function,
      default: null
    },
    commands: {
      type: Function,
      default: null
    }
  },
beforeCreate: function() {
      console.group('------beforeCreate创建前状态------');
      console.log("%c%s", "color:red" , "el     : " + this.$el); //undefined
      console.log("%c%s", "color:red","data   : " + this.$data); //undefined 
      console.log("%c%s", "color:red","message: " + this.message) 
    },
  computed: {
    isFolder: function() {
      return (
        this.model.organizationUnits && this.model.organizationUnits.length
      );
    },
    isok: function() {
      if (this.parentid == this.model.id) {
        this.open = true;
      }
    }
  },
  data() {
    return {
      open: false,
      ppid: this.parentid,
      pdata: this.model
    };
  },
  mounted() {
    console.log('///////////////')
    console.log(this.data)
  },
  methods: {
    toggle() {
      if (this.isFolder) {
        this.open = !this.open;
      }
    },

    //操作回调
    handleCommand(command) {
      console.log(command);
      this.addNew(command);
    }
  },
  components: {
    name: "system"
  }
};
</script>
